Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: End-to-end request via custom EVM Gateway.sol on Ethereum Local Network to custom Relayer to custom Secret contract on Localsecret with response back and then to NunyaBusiness.sol #33

Merged
merged 177 commits into from
Jan 3, 2025

Conversation

ltfschoen
Copy link
Collaborator

@ltfschoen ltfschoen commented Oct 16, 2024

  • TODO
    • Combined .ts script to upload and instantiate Nunya Secret contract similar to the gateway one
    • Update Quickstart docs to only use the Super Quickstart script. Separate section showing what files need configuring (e.g. .env files, config.ts)
    • Clone fresh on remote linode to be able to edit and push to Github there instead since need SGX
    • In response to NunyaBusinessfulfilledSecretContractPubkeyCallback and in send of Gateway.sol where it calls prepareResultBytesToCallbackData for that callback selector, figure out how to destructure just the Secret contract public key that is returned and store it in NunyaBusiness storage . Relates to parsing the unencrypted JSON in Solidity #28
    • Clean up docs and code then go through it with Mork and Sven

@svub
Copy link
Owner

svub commented Oct 17, 2024

Have a look at the svub-encrypt-payload-client-side branch. Let's create a shared folder for all the secret network related code.

@ltfschoen
Copy link
Collaborator Author

ltfschoen commented Nov 3, 2024

After successfully compiling the latest Secret network Rust contract shown here by following these setup instructions to install dependencies, and create and compile the contract:

cd packages/secret-contracts/nunya-contract
make build-mainnet-reproducible

When I then run the following to deploy that Secret contract to Secret Testnet using this script /github/svub/nunya/packages/secret-contracts-scripts/src/index.ts shown here, it gives the following error on that line where it's trying to perform a tx to store/upload the Secret smart contract on the Secret Testnet "pulsar-3", where the endpoint I'm using is https://api.pulsar3.scrttestnet.com for ENDPOINT_TESTNET

    let txOptions = {
      gasLimit: 5_000_000, // default 25_000
      gasPriceInFeeDenom: 1, // default 0.1
      feeDenom: "uscrt",
      feeGranter: wallet.address,
      waitForCommit: true, // default true
      broadcastTimeoutMs: 240_000, // default 60_000
      broadcastCheckIntervalMs: 24_000, // default 6_000 for 6 second block
      broadcastMode: BroadcastMode.Async,
    };
    try {
      tx = await secretjs.tx.compute.storeCode(txParams, txOptions);

As shown, I've already tried changing from the defaults without success.

But I can't find any evidence of the transaction that it mentions in the error logs 1B933BC763EE312F3612E02563873F339D9744CF0A901C8CAE8B1722924E39CF on 3rd Nov when I tried it in the Secret Testnet block explorer associated with that account here https://testnet.ping.pub/secret/account/secret1am2mk908456twwgehmaua85s6laar4yr3awzzj

yarn install
yarn run secret:clean:uploadContract
yarn run secret:start:uploadContract

Error:

process.env.WALLET_MNEMONIC_TESTNET loaded? true
wallet address:  secret1am2mk908456twwgehmaua85s6laar4yr3awzzj
rootPath /Users/luke/code/clones/github/svub/nunya
balance:  { denom: 'uscrt', amount: '289338311' }
Starting deployment...
error:  Error: Transaction ID 1B933BC763EE312F3612E02563873F339D9744CF0A901C8CAE8B1722924E39CF was submitted but was not yet found on the chain. You might want to check later or increase broadcastTimeoutMs from '240000'.
    at SecretNetworkClient.<anonymous> (/Users/luke/code/clones/github/svub/nunya/packages/secret-contracts-scripts/node_modules/secretjs/dist/secret_network_client.js:690:27)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/luke/code/clones/github/svub/nunya/packages/secret-contracts-scripts/node_modules/secretjs/dist/secret_network_client.js:24:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

@ltfschoen ltfschoen requested review from svub and morkeltry and removed request for svub and morkeltry January 3, 2025 01:54
@ltfschoen ltfschoen merged commit d47ef14 into main Jan 3, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants